package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.modular.system.entity.Car;
import cn.stylefeng.guns.modular.system.entity.CollectionCar;
import cn.stylefeng.guns.modular.system.entity.OrderCar;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 车辆表 Mapper 接口
 * </p>
 */
public interface CarMapper extends BaseMapper<Car> {


    List<Map<String, Object>> selectCars(@Param("carType") String carType,
                                          @Param("carColor") String carColor);

    void insertCollectionCar(CollectionCar collectionCar);

    List<Long> getMyCollectionCar(Long userId);

    List<Map<String, Object>> selectCollectionCars(@Param("carIds")List<Long> carIds);

    List<Long> getMyOrderCar(Long userId);

    List<Map<String, Object>> selectOrderCar(@Param("carIds")List<Long> carIds);

    void insertOrderCar(OrderCar orderCar);

    void deleteThisOrder(Long userId);
}
